Optimal. Leaf size=72 \[ \frac{\sqrt{b} \tanh ^{-1}\left (\frac{\sqrt{b} \sec (e+f x)}{\sqrt{a+b \sec ^2(e+f x)-b}}\right )}{f}-\frac{\cos (e+f x) \sqrt{a+b \sec ^2(e+f x)-b}}{f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0573515, antiderivative size = 72, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.174, Rules used = {3664, 277, 217, 206} \[ \frac{\sqrt{b} \tanh ^{-1}\left (\frac{\sqrt{b} \sec (e+f x)}{\sqrt{a+b \sec ^2(e+f x)-b}}\right )}{f}-\frac{\cos (e+f x) \sqrt{a+b \sec ^2(e+f x)-b}}{f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3664
Rule 277
Rule 217
Rule 206
Rubi steps
\begin{align*} \int \sin (e+f x) \sqrt{a+b \tan ^2(e+f x)} \, dx &=\frac{\operatorname{Subst}\left (\int \frac{\sqrt{a-b+b x^2}}{x^2} \, dx,x,\sec (e+f x)\right )}{f}\\ &=-\frac{\cos (e+f x) \sqrt{a-b+b \sec ^2(e+f x)}}{f}+\frac{b \operatorname{Subst}\left (\int \frac{1}{\sqrt{a-b+b x^2}} \, dx,x,\sec (e+f x)\right )}{f}\\ &=-\frac{\cos (e+f x) \sqrt{a-b+b \sec ^2(e+f x)}}{f}+\frac{b \operatorname{Subst}\left (\int \frac{1}{1-b x^2} \, dx,x,\frac{\sec (e+f x)}{\sqrt{a-b+b \sec ^2(e+f x)}}\right )}{f}\\ &=\frac{\sqrt{b} \tanh ^{-1}\left (\frac{\sqrt{b} \sec (e+f x)}{\sqrt{a-b+b \sec ^2(e+f x)}}\right )}{f}-\frac{\cos (e+f x) \sqrt{a-b+b \sec ^2(e+f x)}}{f}\\ \end{align*}
Mathematica [A] time = 0.544072, size = 140, normalized size = 1.94 \[ -\frac{\sin (2 (e+f x)) \csc (e+f x) \sqrt{\sec ^2(e+f x) ((a-b) \cos (2 (e+f x))+a+b)} \left (\sqrt{2} \sqrt{(a-b) \cos (2 (e+f x))+a+b}-2 \sqrt{b} \tanh ^{-1}\left (\frac{\sqrt{(a-b) \cos (2 (e+f x))+a+b}}{\sqrt{2} \sqrt{b}}\right )\right )}{4 f \sqrt{(a-b) \cos (2 (e+f x))+a+b}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.069, size = 144, normalized size = 2. \begin{align*}{\frac{\cos \left ( fx+e \right ) }{f}\sqrt{{\frac{a \left ( \cos \left ( fx+e \right ) \right ) ^{2}- \left ( \cos \left ( fx+e \right ) \right ) ^{2}b+b}{ \left ( \cos \left ( fx+e \right ) \right ) ^{2}}}} \left ( \sqrt{b}\ln \left ( 2\,{\frac{\sqrt{b}\sqrt{a \left ( \cos \left ( fx+e \right ) \right ) ^{2}- \left ( \cos \left ( fx+e \right ) \right ) ^{2}b+b}+b}{\cos \left ( fx+e \right ) }} \right ) -\sqrt{a \left ( \cos \left ( fx+e \right ) \right ) ^{2}- \left ( \cos \left ( fx+e \right ) \right ) ^{2}b+b} \right ){\frac{1}{\sqrt{a \left ( \cos \left ( fx+e \right ) \right ) ^{2}- \left ( \cos \left ( fx+e \right ) \right ) ^{2}b+b}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 3.39196, size = 510, normalized size = 7.08 \begin{align*} \left [-\frac{2 \, \sqrt{\frac{{\left (a - b\right )} \cos \left (f x + e\right )^{2} + b}{\cos \left (f x + e\right )^{2}}} \cos \left (f x + e\right ) - \sqrt{b} \log \left (-\frac{{\left (a - b\right )} \cos \left (f x + e\right )^{2} + 2 \, \sqrt{b} \sqrt{\frac{{\left (a - b\right )} \cos \left (f x + e\right )^{2} + b}{\cos \left (f x + e\right )^{2}}} \cos \left (f x + e\right ) + 2 \, b}{\cos \left (f x + e\right )^{2}}\right )}{2 \, f}, -\frac{\sqrt{-b} \arctan \left (\frac{\sqrt{-b} \sqrt{\frac{{\left (a - b\right )} \cos \left (f x + e\right )^{2} + b}{\cos \left (f x + e\right )^{2}}} \cos \left (f x + e\right )}{b}\right ) + \sqrt{\frac{{\left (a - b\right )} \cos \left (f x + e\right )^{2} + b}{\cos \left (f x + e\right )^{2}}} \cos \left (f x + e\right )}{f}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \sqrt{a + b \tan ^{2}{\left (e + f x \right )}} \sin{\left (e + f x \right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.61938, size = 176, normalized size = 2.44 \begin{align*} -{\left (\frac{{\left (\frac{b \arctan \left (\frac{\sqrt{a \cos \left (f x + e\right )^{2} - b \cos \left (f x + e\right )^{2} + b}}{\sqrt{-b}}\right )}{\sqrt{-b}} + \sqrt{a \cos \left (f x + e\right )^{2} - b \cos \left (f x + e\right )^{2} + b}\right )} \mathrm{sgn}\left (f\right ) \mathrm{sgn}\left (\cos \left (f x + e\right )\right )}{f^{2}} - \frac{{\left (b \arctan \left (\frac{\sqrt{b}}{\sqrt{-b}}\right ) + \sqrt{-b} \sqrt{b}\right )} \mathrm{sgn}\left (f\right ) \mathrm{sgn}\left (\cos \left (f x + e\right )\right )}{\sqrt{-b} f^{2}}\right )}{\left | f \right |} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]